<jsp:include page="logincheck.jsp" />
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ page import="java.util.*" %>

<jsp:useBean id="billingPlanList" class="se2.BillingPlan" scope="request"/>

<html>

	<head>
		<title>Administration Console</title>
		<link rel="stylesheet" href="default.css" type="text/css" media="screen"></link>
		<script src="sorttable.js"></script>
	</head>

	<body>
		<div id="container">
			<div id="navigation">
<p>&nbsp;</p>
<jsp:include page="navigation.jsp" />
			</div>
			
			<div id="header">				
				<img src="images/header.png" />
			</div>

			<div id="content">
<!-- Main code -->

<h1>Billing Plans :: View All</h1>

<table class="sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr style="background-image: url('images/tableBackground.png');" height="50">
		<th style="background-image: url('images/tableBackground.png');" class="sorttable_nosort tableHeader" width="100"><center><a href="addBillingPlan.jsp"><img src="images/add.png"></a></center></td>
		<th style="background-image: url('images/tableBackground.png');" class="tableHeader" width="300" class="tableHeader">Billing Plan Name</td>
		<th style="background-image: url('images/tableBackground.png');" class="tableHeader" width="*"   class="tableHeader">Base Rate</td>
		<th style="background-image: url('images/tableBackground.png');" class="sorttable_nosort tableHeader" width="100" class="tableHeader">&nbsp;</td>
	</tr>

<% boolean odd = false; %>
<c:forEach var="bp" items="${billingPlanList.allBillingPlans}">
	<% if (odd) { %>
		<tr style="background-image: url('images/tableBackground.png');">
	<% } else { %>
		<tr>
	<% } odd = !odd; %>
		<td><center><a href="editBillingPlan.jsp?id=${bp.id}"><img src="images/edit.png" alt="Edit" title="Edit" /></a></center></td>
		<td>${bp.name}</td>
		<td>${bp.baseRate}</td>
		<td><c:if test="${bp.id!=0}"><center><a href="removeBillingPlan.jsp?id=${bp.id}"><img src="images/remove.png" alt="Remove" title="Remove" /></a></center></c:if></td>
	</tr>
</c:forEach>
</table>

<!-- Main Code -->
			</div>

			<div id="footer">
<jsp:include page="footer.jsp" />
			</div>
		</div>
	</body>

</html>